package com.example.coursehub.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.example.coursehub.entity.StudentQuestionAnswer;
import com.example.coursehub.entity.StudentQuestionAnswerId;

public interface StudentQuestionAnswerRepository extends JpaRepository<StudentQuestionAnswer, StudentQuestionAnswerId>, JpaSpecificationExecutor<StudentQuestionAnswer> {
    List<StudentQuestionAnswer> findByExercise_ExerciseIdAndUser_UserId(String exerciseId, String userId);

    void deleteByExercise_ExerciseId(String exerciseId);
}